<?php
namespace Admin\Controller;
use Admin\Controller\CommonController;
use Common\Model\SysconfigModel;
use Think\Controller;

class AuthController extends  CommonController{


	public function index(){
		$model = new SysconfigModel();
		if(IS_POST){
			if(!$model->editConfig()){
				$this->error($model->getError());
			}
			$this->success('修改成功',U('admin/auth/index'));
		}

		$data = $model->getSysConfig();
		$config = array_column($data,'value','varname');

		$this->assign('data',$config);

		$this->display();
	}

}
